#!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import TYPE_CHECKING

from sqlalchemy import Column, ForeignKey, Integer, String, DateTime, text, BigInteger, DECIMAL, TIMESTAMP
from sqlalchemy.orm import relationship

from app.db.base_class import Base


class UserSignature(Base):
    __tablename__ = 'tb_user_signature'

    id = Column(BigInteger, primary_key=True)
    marketType = Column('market_type', String(2))
    platformType = Column('platform_type', Integer)
    userId = Column(Integer)
    signature = Column(String(256))
    createdDate = Column('created_date', TIMESTAMP, server_default=text('CURRENT_TIMESTAMP'))
    updatedDate = Column('updated_date', TIMESTAMP,
                         server_default=text('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))